All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.app.image.ImageDrawer

java.lang.Object
   |
   +----quicktime.app.image.ImageDrawer

public class ImageDrawer
extends Object
implements Drawable
This class will present a normal java.awt.Image object as a client of the QTCanvas.


Variable Index

 o canv
 o im
This is the image that the redraw method will draw to the destination Canvas

Constructor Index

 o ImageDrawer()
Makes a default ImageDrawer that will draw nothing as it has no image to present nor component to present in
 o ImageDrawer(Dimension, Image)

Method Index

 o addedTo(Object)
This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest.
 o getDisplayBounds()
QTCanvas calls this method when it needs to ask the client for its boundary.
 o getImage()
This method returns the current image that this object is presenting
 o getQTLogo()
This returns an ImageDrawer object that presents the standard QuickTime logo
 o redraw(Region)
QTCanvas calls this method when the client should redraw itself.
 o removedFrom(Object)
This method is called by the specified object when the instance of the class that implements this interface is removed from the object that is the source of the interest.
 o setDisplayBounds(QDRect)
QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height.

Variables

 o im
 protected Image im
This is the image that the redraw method will draw to the destination Canvas

 o canv
 protected Component canv

Constructors

 o ImageDrawer
 public ImageDrawer()
Makes a default ImageDrawer that will draw nothing as it has no image to present nor component to present in

 o ImageDrawer
 public ImageDrawer(Dimension initialSize,
                    Image image)

Methods

 o getQTLogo
 public static final ImageDrawer getQTLogo()
This returns an ImageDrawer object that presents the standard QuickTime logo

 o addedTo
 public void addedTo(Object interest)
This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest. The ImageDrawer expect this object to be some kind of java.awt.Component, in which case it will use that Components java.awt.Graphics object to draw the java.awt.Image that it presents in the redraw call.

Parameters:
interest - the object that is to be the source of interest for the the object that implements this interface.
 o removedFrom
 public void removedFrom(Object interest)
This method is called by the specified object when the instance of the class that implements this interface is removed from the object that is the source of the interest. The ImageDrawer expect this object to be some kind of java.awt.Component, in which case it will remove its capability to redraw its java.awt.Image in its redraw call.

Parameters:
interest - the object that was the source of interest for the the object that implements this interface.
 o getImage
 public Image getImage()
This method returns the current image that this object is presenting

 o setDisplayBounds
 public void setDisplayBounds(QDRect bounds) throws QTException
QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height. All values are in pixels.

Parameters:
bounds - the new size and location.
 o getDisplayBounds
 public QDRect getDisplayBounds() throws QTException
QTCanvas calls this method when it needs to ask the client for its boundary. All values are in pixels.

Returns:
the display boundary of the client
 o redraw
 public void redraw(Region invalidRgn) throws QTException
QTCanvas calls this method when the client should redraw itself. If the canvas is able to discern that only a part of the client's drawing area needs to be redrawn - then this area shall be passed in using the invalidRgn. Otherwise this will be null in which case the client should redraw itself entirely.

Parameters:
invalidRgn - the invalidRgn that the client should redraw

All Packages  Class Hierarchy  This Package  Previous  Next  Index